package com.itheima.controller.statistics;

import com.itheima.domin.vo.Result;
import com.itheima.service.ReportService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 统计表响应
 * @Author:上官徵羽
 * @Date: 2025/07/14 16:24
 * @Description TODO 今日内容:
 */
@RestController
@RequestMapping("/report")
@Slf4j
public class ReportController {
    @Autowired
    private ReportService reportService;

    /** 员工职位统计 */
    @GetMapping("/empJobData")
    public Result getEmpHobDate(){
        return Result.success(reportService.getEmpJobDate());
    }

    /** 员工性别统计 */
    @GetMapping("/empGenderData")
    public Result getEmpGenderDate(){
        return Result.success(reportService.getEmpGenderData());
    }

    /** 学员学历统计 */
    @GetMapping("/studentDegreeData")
    public Result getStudentDegreeData(){
        return Result.success(reportService.getStudentDegreeData());
    }

    @GetMapping("/studentCountData")
    public Result getStudentCountData(){
        return Result.success(reportService.getStudentCountData());
    }
}
